<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript">
//			window.onload = function(){
//				var oan = document.getElementById("an")
//				var oanu = document.getElementById("anu")
//				oanu.onclick = function(){
//				var value = oan.value
//				alert(value)
			}}
		</script>
	</head>
	<body>
		<!--<input type="text" name="an" id="an" value="哈哈哈" />
		<input type="button" name="an" id="anu" value="按钮" />-->
		<input type="text" name="text" id="text" value="" />
		<input type="button" name="btn"  id="btn" value="提交" />
		<a href="#" id="nr">姓名：</a>
	</body>
	<script type="text/javascript">
//		var oan = document.getElementById("an")
//		var oanu = document.getElementById("anu")
//		oanu.onclick = function(){
//			var value = oan.value
//			alert(value)}
		
		var otext = document.getElementById("text")
		var obtn = document.getElementById("btn")
		var onr = document.getElementById("nr")
		obtn.onclick = function(){
			var value = otext.value
			onr.innerHTML = onr.innerHTML +value
		}
			
		
		
	</script>
</html>
